-
Notifications
You must be signed in to change notification settings - Fork 53
Large payload externalization support #459
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
sample validated |
…/durabletask-dotnet into wangbill/large-payload
|
TODO: when load test, getting 503 busy periodically. should add retry when upload/download from blob Microsoft.DurableTask.TaskFailedException: Task 'SayHello' (#8) failed with an unhandled exception: Ingress is over the account limit. RequestId:7f562149-b01e-0044-3d2b-116c5b000000 Time:2025-08-19T17:03:34.3967120Z Status: 503 (Ingress is over the account limit.) ErrorCode: ServerBusy Content: Stack trace: at Microsoft.DurableTask.Worker.Shims.TaskOrchestrationContextWrapper.CallActivityAsync[T](TaskName name, Object input, TaskOptions options) |
cgillum
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a great feature, and a nice use of the DataConverter abstraction. Here's my first round of feedback.
src/Client/Core/DependencyInjection/DurableTaskClientBuilderExtensions.cs
Outdated
Show resolved
Hide resolved
|
|
||
| namespace Microsoft.DurableTask.Grpc.Tests; | ||
|
|
||
| public class LargePayloadTests(ITestOutputHelper output, GrpcSidecarFixture sidecarFixture) : IntegrationTestBase(output, sidecarFixture) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need tests for entities as well. Specifically, entity operations and entity state needs to be considered.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see samples, but I don't see automated tests for entities. Did I miss it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sorry for confusion @cgillum i answered this in other comments. i found the current testing backend setup does not support entity, so i added it in the sample and validated it e2e. the entity sample e2e result looks correct. can we use sample for verification and later add this to dts e2e tests which more closely simulate the production experience?

src/Client/Core/DependencyInjection/DurableTaskClientBuilderExtensions.cs
Outdated
Show resolved
Hide resolved
src/Extensions/AzureBlobPayloads/Converters/BlobPayloadStore.cs
Outdated
Show resolved
Hide resolved
src/Extensions/AzureBlobPayloads/Converters/BlobPayloadStore.cs
Outdated
Show resolved
Hide resolved
src/Extensions/AzureBlobPayloads/Converters/LargePayloadDataConverter.cs
Outdated
Show resolved
Hide resolved
src/Extensions/AzureBlobPayloads/Converters/LargePayloadDataConverter.cs
Outdated
Show resolved
Hide resolved
|
|
||
| // Upload synchronously in this context by blocking on async. SDK call sites already run on threadpool. | ||
| byte[] bytes = this.utf8.GetBytes(json); | ||
| string token = this.payLoadStore.UploadAsync(bytes, CancellationToken.None).GetAwaiter().GetResult(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's very problematic for us to call async code from a non-async abstraction. It can create very bad performance and availability problems for the customer, like thread starvation. We should look into supporting async serialize and deserialize methods from the DataConverter abstraction.
src/Extensions/AzureBlobPayloads/Converters/LargePayloadDataConverter.cs
Outdated
Show resolved
Hide resolved
src/Worker/Core/DependencyInjection/DurableTaskWorkerBuilderExtensions.cs
Outdated
Show resolved
Hide resolved
|
|
||
| namespace Microsoft.DurableTask.Grpc.Tests; | ||
|
|
||
| public class LargePayloadTests(ITestOutputHelper output, GrpcSidecarFixture sidecarFixture) : IntegrationTestBase(output, sidecarFixture) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see samples, but I don't see automated tests for entities. Did I miss it?
…/durabletask-dotnet into wangbill/large-payload
|
abandoning this PR and move this feature change to another pr #468 |







This pull request introduces support for externalized payload storage using Azure Blob Storage, enabling large payloads to be stored out-of-band and referenced via tokens. The changes add a new abstraction for payload storage, implement an Azure Blob-based store, and provide integration points for both client and worker dependency injection to enable this feature. Additionally, a new data converter is introduced to automatically externalize large payloads based on configurable thresholds.
Externalized Payload Storage Infrastructure:
IPayloadStoreinterface to abstract storing and retrieving large payloads out-of-band, with async upload and download methods.BlobPayloadStore, anIPayloadStorethat stores payloads as compressed blobs in Azure Blob Storage and returns opaque tokens for retrieval.LargePayloadStorageOptionsto configure externalized storage (enable/disable, threshold, connection string, container name).Data Conversion Enhancements:
LargePayloadDataConverter, aDataConverterthat wraps another converter and externalizes payloads exceeding a configurable size threshold, using the configuredIPayloadStore.DataConverterclass to support external storage by adding theUsesExternalStorageproperty and clarifying documentation.Dependency Injection & Configuration:
UseExternalizedPayloadsextension methods to bothIDurableTaskClientBuilderandIDurableTaskWorkerBuilderto register the required services and wrap the configured data converter for externalized payload support. [1] [2]These changes collectively enable seamless, configurable support for handling large payloads in Durable Task workflows by storing them externally and referencing them within orchestration messages.